// -----------------------------------------------------------------------------
// Generate By Furion Tools v2.2.6                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;

namespace Purchasing.Core
{
    public partial class HrmSubCompany : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<HrmSubCompany, MasterDbContextLocator>
    {
    
        public int Id { get; set; }
        public string Subcompanyname { get; set; }
        public string Subcompanydesc { get; set; }
        public byte? Companyid { get; set; }
        public int? Supsubcomid { get; set; }
        public string Url { get; set; }
        public int? Showorder { get; set; }
        public string Canceled { get; set; }
        public string Subcompanycode { get; set; }
        public string Outkey { get; set; }
        public int? BudgetAtuoMoveOrder { get; set; }
        public string EcologyPinyinSearch { get; set; }
        public int? LimitUsers { get; set; }
        public int? Tlevel { get; set; }
        public string PkCorp { get; set; }
        public string AreaCode { get; set; }
        public string AreaName { get; set; }
        public DateTime? Created { get; set; }
        public int? Creater { get; set; }
        public DateTime? Modified { get; set; }
        public int? Modifier { get; set; }
    
        public void Configure(EntityTypeBuilder<HrmSubCompany> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasIndex(e => e.Companyid, "hrmsubcompany_companyid_in");

                entityBuilder.Property(e => e.Id).HasColumnName("id");

                entityBuilder.Property(e => e.AreaCode).HasMaxLength(10);

                entityBuilder.Property(e => e.AreaName).HasMaxLength(50);

                entityBuilder.Property(e => e.BudgetAtuoMoveOrder).HasColumnName("budgetAtuoMoveOrder");

                entityBuilder.Property(e => e.Canceled)
                    .HasMaxLength(1)
                    .IsUnicode(false)
                    .HasColumnName("canceled")
                    .IsFixedLength(true);

                entityBuilder.Property(e => e.Companyid).HasColumnName("companyid");

                entityBuilder.Property(e => e.Created)
                    .HasColumnType("datetime")
                    .HasColumnName("created");

                entityBuilder.Property(e => e.Creater).HasColumnName("creater");

                entityBuilder.Property(e => e.EcologyPinyinSearch)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("ecology_pinyin_search");

                entityBuilder.Property(e => e.LimitUsers)
                    .HasColumnName("limitUsers")
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.Modified)
                    .HasColumnType("datetime")
                    .HasColumnName("modified");

                entityBuilder.Property(e => e.Modifier).HasColumnName("modifier");

                entityBuilder.Property(e => e.Outkey)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("outkey");

                entityBuilder.Property(e => e.PkCorp)
                    .HasMaxLength(100)
                    .IsUnicode(false)
                    .HasColumnName("pk_corp");

                entityBuilder.Property(e => e.Showorder).HasColumnName("showorder");

                entityBuilder.Property(e => e.Subcompanycode)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("subcompanycode");

                entityBuilder.Property(e => e.Subcompanydesc)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("subcompanydesc");

                entityBuilder.Property(e => e.Subcompanyname)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("subcompanyname");

                entityBuilder.Property(e => e.Supsubcomid)
                    .HasColumnName("supsubcomid")
                    .HasDefaultValueSql("((0))");

                entityBuilder.Property(e => e.Tlevel).HasColumnName("tlevel");

                entityBuilder.Property(e => e.Url)
                    .HasMaxLength(1000)
                    .IsUnicode(false)
                    .HasColumnName("url");
        }

    }
}
